import Vue from "vue"
import VueRouter from "vue-router"
// import App from "../App.vue"
import SignIn from "@/views/login/Sign_in.vue"
// import SelectLdentity from "@/views/login/SelectLdentity.vue"
// import Home from "@/views/Home.vue"
import policy from "@/views/policy.vue"
// import product from "@/views/product.vue"
import xuanke from "@/views/xuanke.vue"
import main from "@/views/main.vue"
import Signinx from "@/views/login/Signinx.vue"
// import Administration from "@/views/design/management/Administration.vue"
// import expertHome from "@/views/expert/expertHome.vue"
// import ManagementCenter from "@/views/ManagementCenter.vue"
// import major from "@/views/major.vue"
import details from "@/views/details.vue"
import school from "@/views/School.vue"
// import ManagingStudents from "@/views/ManagingStudents.vue"
// import archives from "@/views/archives.vue"
// import location from "@/views/location.vue"
// import StudentInformation from "@/views/StudentInformation.vue"
// import Golocation from "@/views/to/GoLocation.vue"
import Gostulocation from "@/views/to/GoStuLocation.vue"
// import stuProfessional from "@/views/stu/stuProfessional.vue"
// import ceshi from "@/views/ceshi.vue"
import toProgramme from "@/views/to/toProgramme.vue"
import xingaokao from "@/views/xingaokao.vue"
import XkAdministration from "@/views/XkAdministration.vue"
import newSchoolProgramme from "@/views/newSchoolProgramme.vue"
import toNewSchoolProgramme from "@/views/to/toNewSchoolProgramme.vue"
import XkPreview from "@/views/XkPreview.vue"
import layout from "@/layout"

Vue.use(VueRouter)

const routes = [
	// {
	// 	path:'/SignIn',
	// 	name:'专家登录',
	// 	component:SignIn,
	// },
	// {
	// 	path:'/Signinx',
	// 	name:'学生登录',
	// 	component:Signinx,
	// },
	{
		path: '/',
		name: 'Home',
		component: layout,
		show: true,
		redirect:"/main",
		children: [
			{
				path: '/login',
				name: '登录',
				meta: {
					title: '登录'
				},
				component: () => import('@/views/login/index.vue')
			},
			{
				path: '/SignIn',
				name: '专家登录',
				meta: {
					title: '专家登录'
				},
				component: SignIn
			},

			{
				path: '/Signinx',
				name: '学生登录',
				meta: {
					title: '学生登录'
				},
				component: Signinx
			},
			{
				path: '/main',
				name: '首页',
				show: true,
				expert:true,
				meta: {
					title: '首页'
				},
				component: main
			},
			// {
			// 	path: '/product',
			// 	name: '产品服务',
			// 	show: true,
			// 	expert:true,
			// 	meta: {
			// 		title: '产品服务',
			// 	},
			// 	component: product
			// },
			{
				path: '/policy',
				name: '政策资讯',
				expert:true,
				show: true,
				meta: {
					title: '政策资讯',
					requiresAuth: true,
					keepAlive: true,
				},
				component: policy
			},
			{
				path: '/xuanke',
				name: '高考选科',
				expert:false,
				show: false,
				meta: {
					title: '高考选科'
				},
				component: xuanke
			},



			{
				path: '/xingaokao',
				name: '高考选科',
				// expert:true,
				// show: true,
				meta: {
					title: '高考选科',
					requiresAuth: true,
				},
				component: xingaokao
			},


			{
				path: '/speciality',
				name: '专业解读',
				redirect: '/speciality/majors',
				expert: true,
				show: true,
				meta: {
					title: '专业解读',
					requiresAuth: true,
				},
				component: () => import('@/views/router-view.vue'),
				children: [
					{
						path: 'majors',
						meta: {
							title: '专业解读',
							requiresAuth: true,
						},
						component: () => import('@/views/speciality/majors/index.vue')
					},
					{
						path: 'majorsDetail',
						meta: {
							title: '专业解读',
							requiresAuth: true,
						},
						component: () => import('@/views/speciality/majorsDetail/index.vue')
					},
					{
						path: 'diff',
						meta: {
							title: '专业对比',
							requiresAuth: true,
						},
						component: () => import('@/views/speciality/diff/index.vue')
					},
				]
			},

			{
				path: '/StuSchoolInformation',
				name: '院校查询',
				// expert:true,
				show: true,
				meta: {
					title: '院校查询',
					requiresAuth: true,
				},
				component: () => import('@/views/school/list/indexStudent.vue')
			},
			{
				path: '/SchoolInformation',
				name: '院校查询',
				expert:true,
				// show: true,
				meta: {
					title: '院校查询',
					requiresAuth: true,
				},
				component: () => import('@/views/school/list/indexTeacher.vue')
			},
			{
				path: '/design',
				name: '方案设计',
				redirect: '/design/center',
				expert: true,
				show: true,
				meta: {
					title: '方案设计',
					requiresAuth: true,
				},
				component: () => import('@/views/router-view.vue'),
				children: [
					{
						path: 'center',
						meta: {
							title: '方案设计',
							requiresAuth: true,
						},
						component: () => import('@/views/design/center/index.vue')
					},
					{
						path: 'management',
						meta: {
							title: '方案设计',
							requiresAuth: true,
						},
						component: () => import('@/views/design/management/index.vue')
					},
					{
						name: 'designPreview',
						path: 'preview', // 预览
						meta: {
							title: '方案设计',
							requiresAuth: true,
						},
						component: () => import('@/views/design/preview/index.vue')
					},
					{
						path: 'programme', // 新增|编辑 老师角色
						meta: {
							title: '方案设计',
							requiresAuth: true,
						},
						component: () => import('@/views/design/programme/index.vue')
					},
					{
						path: 'studentProgramme', // 新增|编辑 学生角色
						meta: {
							title: '方案设计',
							requiresAuth: true,
						},
						component: () => import('@/views/design/programme/indexStudent.vue')
					},
					{
						path: 'print',	// 打印
						show: false,
						meta: {
							title: '方案设计'
						},
						component: () => import('@/views/design/print/index.vue')
					},
					{
						path: 'singlePrint', // 列表上的打印
						name: 'designSinglePrint',
						meta: {
							title: '方案设计',
							requiresAuth: true,
						},
						component: () => import('@/views/design/print/singlePrint.vue')
					},
					{
						path: 'stuLocation',
						meta: {
							title: '定位专业',
							requiresAuth: true,
						},
						component: () => import('@/views/design/stuLocation/index.vue')
					},
					{
						path: 'stuArchives',
						meta: {
							title: '建立档案',
							requiresAuth: true,
						},
						component: () => import('@/views/design/stuArchives/index.vue')
					},
				]
			},
			{
				path: '/schoolV2',
				name: '院校查询(新)',
				redirect: '/schoolV2/index',
				expert: true,
				show: true,
				meta: {
					title: '院校查询新',
					requiresAuth: true,
				},
				component: () => import('@/views/router-view.vue'),
				children: [
					{
						path: 'index',
						meta: {
							title: '院校查询新',
							requiresAuth: true,
						},
						component: () => import('@/views/schoolV2/list/indexTeacher.vue')
					},
					{
						name: 'schoolV2Detail',
						path: 'detail',
						meta: {
							title: '院校解读',
						},
						component: () => import('@/views/schoolV2/detail/index.vue')
					},
					{
						path: 'schoolDiff',
						meta: {
							title: '院校对比',
						},
						component: () => import('@/views/schoolV2/diff/index.vue')
					},
				]
			},
			{
				path: '/designV2',
				name: '方案设计(新)',
				redirect: '/designV2/center',
				expert: true,
				show: true,
				meta: {
					title: '方案设计(新)',
					requiresAuth: true,
				},
				component: () => import('@/views/router-view.vue'),
				children: [
					{
						path: 'center',
						meta: {
							title: '方案设计(新)',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/center/index.vue')
					},
					{
						path: 'management',
						meta: {
							title: '方案设计(新)',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/management/index.vue')
					},
					{
						name: 'designV2Preview',
						path: 'preview', // 预览
						meta: {
							title: '方案设计(新)',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/preview/index.vue')
					},
					{
						path: 'programme', // 新增|编辑 老师角色
						meta: {
							title: '方案设计(新)',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/programme/index.vue')
					},
					{
						path: 'studentProgramme', // 新增|编辑 学生角色
						meta: {
							title: '方案设计(新)',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/programme/indexStudent.vue')
					},
					{
						path: 'print',	// 打印
						show: false,
						meta: {
							title: '方案设计(新)'
						},
						component: () => import('@/views/designV2/print/index.vue')
					},
					{
						path: 'singlePrint', // 列表上的打印
						name: 'designV2SinglePrint',
						meta: {
							title: '方案设计(新)',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/print/singlePrint.vue')
					},
					{
						path: 'stuLocation',
						meta: {
							title: '定位专业',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/stuLocation/index.vue')
					},
					{
						path: 'stuArchives',
						meta: {
							title: '建立档案',
							requiresAuth: true,
						},
						component: () => import('@/views/designV2/stuArchives/index.vue')
					},
					{
						path: 'seniorSchool', // 新高考
						meta: {
							title: '新高考'
						},
						component: () => import('@/views/designV2/seniorSchool/index.vue')
					},
				]
			},
			{
				path: '/details',
				name: 'details',
				show: false,
				meta: {
					title: '政策资讯'
				},
				component: details
			},
			{
				path: '/school',
				name: 'school',
				show: false,
				meta: {
					title: '院校解读'
				},
				component: () => import('@/views/school/detail/index.vue')
			},
			{
				path: '/schoolDiff',
				name: 'schoolDiff',
				meta: {
					title: '院校对比'
				},
				component: () => import('@/views/school/diff/index.vue')
			},
			{
				path: '/Gostulocation',
				name: 'Gostulocation',
				show: false,
				meta: {
					title: '方案设计'
				},
				component: Gostulocation
			},
			{
				path: '/toProgramme',
				name: 'toProgramme',
				show: false,
				meta: {
					title: '方案设计'
				},
				component: toProgramme
			},
			{
				path: '/XkAdministration',
				name: '选科方案',
				meta: {
					title: '选科方案',
					requiresAuth: true,
				},
				component: XkAdministration
			},
			{
				path: '/newSchoolProgramme',
				name: 'newSchoolProgramme',
				meta: {
					title: '方案设计',
					requiresAuth: true,
				},
				component: newSchoolProgramme
			},
			{
				path: '/toNewSchoolProgramme',
				name: 'toNewSchoolProgramme',
				meta: {
					title: '方案设计',
					requiresAuth: true,
				},
				component: toNewSchoolProgramme
			},
			{
				path: '/XkPreview',
				name: 'XkPreview',
				meta: {
					title: '方案设计',
					requiresAuth: true,
				},
				component: XkPreview
			},
      {
				path: '/aiQA',
				name: 'AI 问答',
				meta: {
					title: 'AI 问答',
					requiresAuth: true,
				},
				show: false,
				expert: false,
				component: () => import('@/views/aiQA.vue')
			},
      {
        path: '/recycle',
        name: 'recycle',
        show: false,
        meta: {
          title: '回收站'
        },
        component: () => import('@/views/recycle/index.vue')
      },
		]
	},
]

const originalPush = VueRouter.prototype.push

VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
const router = new VueRouter({
	mode: 'hash',
	routes
})







export default routes
